getValueSet

abstract fun <T : Any> getValueSet(propertyName: String, clazz: KClass<T>): RealmSet<T>

Returns the set of non-nullable value elements referenced by the property name as a RealmSet.

The class argument must be the KClass of the RealmStorageType for the property.

To retrieve values, objects or set of nullable elements or object use the get<X>Value, getObject and other get<X>Set variants.

Return

the referenced RealmSet

Parameters

propertyName

the name of the set property to retrieve the set for.

clazz

the Kotlin class of the set element type.

T

the type of the set element type.

Throws

if the class doesn't contain a field with the specific name, if trying to retrieve values for non-set properties or if clazz doesn't match the property's RealmStorageType.kClass.